QuickOPC User's Guide and Reference
ReadMultipleItems(IEasyDAClient,ServerDescriptor,DAItemDescriptor[],DAReadParameters) Method



OpcLabs.EasyOpcClassicCore Assembly > OpcLabs.EasyOpc.DataAccess Namespace > IEasyDAClientExtension Class > ReadMultipleItems Method : ReadMultipleItems(IEasyDAClient,ServerDescriptor,DAItemDescriptor[],DAReadParameters) Method
The client object that will perform the operation.
The OPC server involved in the operation.
Array of OPC items involved in the operation.
Contains parameters for OPC read operations, such as the data source or value age.
Reads multiple named items from a single OPC server, using descriptor objects for the OPC server and OPC-DA items, and specifying read operation parameters.
Syntax
'Declaration
 
<ExtensionAttribute()>
<ElementsNotNullAttribute()>
<NotNullAttribute()>
Public Overloads Shared Function ReadMultipleItems( _
   ByVal client As IEasyDAClient, _
   ByVal serverDescriptor As ServerDescriptor, _
   ByVal itemDescriptorArray() As DAItemDescriptor, _
   ByVal readParameters As DAReadParameters _
) As DAVtqResult()
'Usage
 
Dim client As IEasyDAClient
Dim serverDescriptor As ServerDescriptor
Dim itemDescriptorArray() As DAItemDescriptor
Dim readParameters As DAReadParameters
Dim value() As DAVtqResult
 
value = IEasyDAClientExtension.ReadMultipleItems(client, serverDescriptor, itemDescriptorArray, readParameters)

Parameters

client
The client object that will perform the operation.
serverDescriptor
The OPC server involved in the operation.
itemDescriptorArray
Array of OPC items involved in the operation.
readParameters
Contains parameters for OPC read operations, such as the data source or value age.

Return Value

The function returns an array of OpcLabs.EasyOpc.DataAccess.OperationModel.DAVtqResult objects. The indices of elements in the output array are the same as those in the input array, itemDescriptorArray.
Exceptions
ExceptionDescription

A null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

 

This is a multiple-operation method. In a properly written program, it does not throw any exceptions. You should therefore not put try/catch statements or similar constructs around calls to this method. The only exceptions thrown by this method are for usage errors, i.e. when your code violates the usage contract of the method, such as passing in invalid arguments or calling the method when the state of the object does not allow it. Any operation-related errors (i.e. errors that depend on external conditions that your code cannot reliably check) are indicated in the result objects returned by the method. For more information, see Multiple-operation Methods and Do not catch any exceptions with asynchronous or multiple-operation methods.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also